class Factorial 
{
    public static void main(String[] a) 
    {
        {
        System.out.println(new Fac().ComputeFac(10));
        System.out.println(new Fac().ComputeFbc(10));
        }
    }
}

class Fac 
{
  ;
    public int ComputeFac(int num) 
    {
        int num_aux;
              
        ;
        
        if (num < 1)
            num_aux = 1;
        else
            num_aux = num * (this.ComputeFac(num-1));
        return num_aux;
    }
    
    
    public int ComputeFbc(int num) 
    {
        int num_bux;
              
        ;
        
        if (num < 1)
            num_bux = 1;
        else
            if (5<num)
                num_bux = num * (this.ComputeFbc(num-1));
            else
                num_bux = num + (this.ComputeFbc(num-1));
        return num_bux;
    }
    
}